#include<iostream>
#include<vector>
#include<queue>
#include<cstring>
#include<cmath>
#include<map>
#include<set>
#include<cstdio>
#include<algorithm>
#define debug(a) cout<<#a<<"="<<a<<endl;
using namespace std;
const int maxn=1e5+1000;
typedef long long LL;
const LL mod=1e9+7;
inline LL read(){LL x=0,f=1;char ch=getchar();	while (!isdigit(ch)){if (ch=='-') f=-1;ch=getchar();}while (isdigit(ch)){x=x*10+ch-48;ch=getchar();}
return x*f;}
LL p[maxn],f[maxn];
char str[maxn];
int main(void)
{
  cin.tie(0);std::ios::sync_with_stdio(false);
  cin>>(str+1);
  LL n=strlen(str+1);
  p[0]=1;
  for(LL i=1;i<maxn-10;i++) p[i]=p[i-1]*10%mod;
  f[0]=1;
  for(LL i=1;i<maxn-10;i++){
    f[i]=(f[i-1]%mod+(i+1)%mod*p[i]%mod)%mod;
  }
  LL ans=0;
  for(LL i=1;i<=n;i++){
    LL t1=(i*(i-1)/2%mod*(str[i]-'0')%mod*p[n-i])%mod;
    LL t2=(str[i]-'0')*f[n-i-1]%mod;
    ans=(ans%mod+t1%mod+t2%mod )%mod;
  }
  cout<<ans%mod<<"\n";
return 0;
}
